<template>
	<view>
		<my-swiper-list ref="swiperListMode" :tabArray="swiperParam.tabArray" :requestUrl="swiperParam.requestUrl" :typeName="swiperParam.typeName" :requestParam="swiperParam.requestParam">
			<template #TabSwiperList="{contentSwiperList}">
				<integralRecordList :swiperList="contentSwiperList"></integralRecordList>
			</template>
		</my-swiper-list>
	</view>
</template>

<script>
	import {mapState} from 'vuex'
	import {setNavTitle,skipPage} from '@/utils/common.js'
	import integralRecordList from "./integralRecordList.vue"
	export default {
		data() {
			return {
				param:{title:''},//接收参数
				swiperParam:{
					requestUrl:'',
					tabArray:[],
					requestParam:{},
					typeName:'reviewStatus'
				}
			};
		},
		components:{
			integralRecordList
		},
		computed:{
			...mapState('m_user',['userInfo']),
		},
		methods:{
			setparam(title=this.param.title){
				if(title=='积分凭证'){
					this.swiperParam.requestUrl='/poPhotoCreditReviewForm/list'
					this.swiperParam.tabArray=[
						{id:'0',name:'全部',content:[],},
						{id:'1',name:'待审核',content:[],reviewStatus:'0'},
						{id:'2',name:'已通过',content:[],reviewStatus:'1'},
						{id:'3',name:'不通过',content:[],reviewStatus:'2'},
					]
					this.swiperParam.requestParam={userId:this.userInfo.userId}
					this.swiperParam.typeName='reviewStatus'
				}
			}
		},
		onReady(){//监听页面初次渲染完成
			setNavTitle(this.param.title)//设置导航栏标题
		},
		onLoad(option) {
			this.param=option
			this.setparam()
		},
		onShow() {
			this.$refs.swiperListMode.getListData(false,true,this.swiperParam.requestParam,this.swiperParam.requestUrl,this.swiperParam.tabArray,true)
			
		}
	}
</script>

<style lang="scss">

</style>
